<script setup lang="ts">
import { ref } from 'vue';
import { onLaunch } from '@dcloudio/uni-app';
const mc = ref('#4169E1');
function setMainColor(color: string) {
	mc.value = color;
}
onLaunch(() => {
	uni.getSystemInfo().then((res: any) => {
		const app = getApp();
		app.globalData = {
			screenWidth: res.safeArea.width,
			statusHeight: res.statusBarHeight + 'px',
			// #ifdef MP-WEIXIN
			headerHeight: res.statusBarHeight + 54 + 'px',
			// #endif
			mainColor: mc,
			setMainColor: setMainColor
		};
	});
});
</script>
<style lang="scss">
@import './uni.scss';
</style>
